Preparing a Debug Version of a Program

Before a program can be debugged, you must include debugging information with the project. It is also a good idea to disable code optimization, so that line numbers in the source file match line numbers being executed. Your compiler and linker documentation cover these options.

{bmc bm4.MRB}        To build the GENERIC project for debugging

  1.  Open a command prompt from the Start menu.

  2.  Move to the directory containing the GENERIC example program. It should be under the MSTOOLS\SAMPLES\WIN32 directory.

  3.  If you are using Microsoft Visual C++, build the executable by typing

NMAKE /A
 

Otherwise, follow the instructions included with your development tools for building a Win32-based application.

  4.  Load the executable into WinDbg by typing

WINDBG GENERIC.EXE